<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="/WEB-INF/tlds/c.tld"%>
<%@ taglib prefix="spring" uri="/WEB-INF/tlds/spring.tld"%>
<c:set var="BasePath" value="${pageContext.request.contextPath}"></c:set>
<c:set var="Plugins" value="${pageContext.request.contextPath}/res/plugins"></c:set>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>商品列表</title>
<link href="${Plugins}/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
<link href="${Plugins}/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
<script src="${Plugins}/datepicker/WdatePicker.js" type="text/javascript"></script>
<script src="${Plugins}/jquery/jquery-1.3.2.min.js"	type="text/javascript"></script>
<script src="${Plugins}/ligerUI/js/ligerui.min.js" type="text/javascript"></script>
<script type="text/javascript" src="${BasePath}/res/js/ligerCommon.js"></script>

<style type="text/css">
#searchbar{
   margin-bottom: 10px;
   margin-left:15px;
  }
  .navbar {
		height: 20px;
		border-bottom: #E6E6E6 solid 1px;
		line-height: 20px;
	}
.l-button-search {
	width: 155px;
	margin-left: 10px;
	padding-bottom: 2px;
	display: inline;
}
</style>
</head>
<script type="text/javascript">
	function checkForm() {
		var nowMonth = new Date().format('yyyy-MM');
		var yearOfMonth = $('#yearOfMonth').val();
		if (yearOfMonth == '') {
			$.ligerDialog.warn("请选择导出年月");
			return;
		}
		if (nowMonth <= yearOfMonth) {
			$.ligerDialog.warn("您选择年月应小于当前年月");
			return;
		}
		$('#queryForm').submit();
	}
	
	//日期格式化
	Date.prototype.format = function(format) {
		var o = {
			"M+" : this.getMonth()+1, //month
			"d+" : this.getDate(),    //day
			"H+" : this.getHours(),   //hour
		 	"m+" : this.getMinutes(), //minute
			"s+" : this.getSeconds(), //second
		 	"q+" : Math.floor((this.getMonth()+3)/3),  //quarter
		 	"S" : this.getMilliseconds() //millisecond
		};

		if(/(y+)/.test(format)) {
			format = format.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
		}
		for(var k in o) {
			if(new RegExp("("+ k +")").test(format)) {
				format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
			}
		}
		return format;
	};
</script>
<body style="padding:6px; overflow:hidden;">
<div class="navbar">
		<span>您当前的位置：商品管理 &gt</span>
		月收发存汇总EXCEL导出
</div><br><br>
<form action="doExportMiaocExcel.do"  name="queryForm" id="queryForm" method="POST">
		导出年月：<input id="yearOfMonth" type="text" name="yearOfMonth" readonly="readonly" value="${yearOfMonth }" class="Wdate" value="" size="21"
    	onFocus="WdatePicker({dateFmt:'yyyy-MM',readOnly:true,autoPickDate:true})" ><br><br><br>
		<input type="button" value="月收发存汇总EXCEL导出" class="l-button-search" onclick="javascript:checkForm();">&nbsp;&nbsp;&nbsp;&nbsp;
	</form><br>
<div id="maingrid" style="margin:0; padding:0"></div>
  <div style="display:none;">
  <!-- 展示列表数据  -->
</div><br><br>
</body>
</html>